{% extends "base.html" %}
<title>{% block head_title %}{{ page_title }}{% endblock %}</title>
{% load endless %}
{% block breadcrumb %}
{% if catalog %}
 	{{ block.super }} <a href="{{site.name}}/catalogo_{{ catalog.slug }}/">{{ catalog.name }}</a>
{% endif %}
{% if category %}
 	{{ block.super }}  <a href="{{site.name}}/catalogo_{{ category.catalog.slug }}/">{{ category.catalog.name }}</a> 
 		&rsaquo;&rsaquo; <a href="{{site.name}}/categoria_{{ category.slug }}__catalogo_{{ category.catalog.slug }}">{{ category.name }}</a>
{% endif %}
{% if not catalog and not category %}
	 	<a href="/">Inicio</a>
{% endif %} 
{% endblock %}
{% block index %}
	 {% if items %}
	<strong>Pagina</strong>
    {% load humanize %}
   {% paginate 4 items %}
	<table id="some_id" class="item-table">    
	<tbody>
	    {% for item in items %}
	    <tr>
	    	<td>
	    		<a  id="{{ item.code }}" href="{{site.name}}/articulo_{{ item.slug }}__categoria_{{ item.category.slug }}__catalogo_{{ item.category.catalog.slug }}">
	    			<img class="img-table" src="{{ item.photo.image.url }}" alt="{{ item.photo.title }}" />
		    	</a>
			</td>
	    	<td>
	    		<a href="{{site.name}}/articulo_{{ item.slug }}__categoria_{{ item.category.slug }}__catalogo_{{ item.category.catalog.slug }}">
	    			<h3>{{ item.description }}</h3>
			    </a>
	    	    <p>{{ item.category.name }} - {{ item.category.catalog.name }}</p>
			    <p>
			    	<g:plusone href="{{site.name}}/articulo_{{item.slug}}__categoria_{{ category.slug }}__catalogo_{{ category.catalog.slug }}" 
			    			  size="standard" 
			    			  count="false">
	    			</g:plusone>
	    		</p>
	    		
	    	</td>
	    	<td>
	    	    <p class="price">$ ARG {{ item.price }}  </p>
	    		<p style=" margin-left: 165px;"><a href="{{site.name}}/articulo_{{ item.slug }}__categoria_{{ item.category.slug }}__catalogo_{{ item.category.catalog.slug }}">
	    			Ver el Detalle
			    	</a>
		  		</p>
	    	</td>
	    </tr>
	    {% endfor %}
	    {% get_pages %}
		{{ pages }}
	    
	</tbody>
	</table>
	<strong>Pagina</strong>
	{% get_pages %}
	{{ pages }}
	{% else %}
	<h3>No hay articulos para la categoria seleccionada.</h3>
	{% endif %}

{% endblock %}
 
